function add_suffix(val) {
    const prefix = ['B', 'KB', 'MB', 'GB', 'TB'];
    for (let i = 0; i < prefix.length; i++) {
        if (Math.abs(val) < 1000) {
            return val.toFixed(2) + prefix[i]
        }
        val = parseInt(val / 1000)
    }
    return val.toFixed(2) + 'PB'
}